# Maintainer: Alexey Pavlov <alexpux@gmail.com>
# Maintainer: Ray Donnelly <mingw.android@gmail.com>
# Contributor: Saul Ibarra Corretge <saghul@gmail.com>
# Contributor: Frode Solheim <frode@fs-uae.net>

_primary_python="yes"
_pybasever=3.9
_realname=python

if [[ "${_primary_python}" == "yes" ]]; then
  pkgbase="mingw-w64-${_realname}"
  pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
  provides=("${MINGW_PACKAGE_PREFIX}-python3"
            "${MINGW_PACKAGE_PREFIX}-python${_pybasever}")
  conflicts=("${MINGW_PACKAGE_PREFIX}-python3"
             "${MINGW_PACKAGE_PREFIX}-python${_pybasever}"
            "${MINGW_PACKAGE_PREFIX}-python2<2.7.16-7")
  replaces=("${MINGW_PACKAGE_PREFIX}-python3"
            "${MINGW_PACKAGE_PREFIX}-python${_pybasever}")
else
  pkgbase="mingw-w64-${_realname}${_pybasever}"
  pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}${_pybasever}")
fi
pkgver=${_pybasever}.7
pkgrel=2
pkgdesc="A high-level scripting language (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
license=('PSF')
url="https://www.python.org/"
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
         "${MINGW_PACKAGE_PREFIX}-expat"
         "${MINGW_PACKAGE_PREFIX}-bzip2"
         "${MINGW_PACKAGE_PREFIX}-libffi"
         "${MINGW_PACKAGE_PREFIX}-mpdecimal"
         "${MINGW_PACKAGE_PREFIX}-ncurses"
         "${MINGW_PACKAGE_PREFIX}-openssl"
         "${MINGW_PACKAGE_PREFIX}-sqlite3"
         "${MINGW_PACKAGE_PREFIX}-tcl"
         "${MINGW_PACKAGE_PREFIX}-tk"
         "${MINGW_PACKAGE_PREFIX}-zlib"
         "${MINGW_PACKAGE_PREFIX}-xz"
         "${MINGW_PACKAGE_PREFIX}-tzdata")
makedepends=(
  "${MINGW_PACKAGE_PREFIX}-gcc"
  "${MINGW_PACKAGE_PREFIX}-pkg-config"
  "autoconf-archive"
)
options=('makeflags') # 'debug' '!strip')
source=("https://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz"
        0001-sysconfig-make-_sysconfigdata.py-relocatable.patch
        0002-restore-setup-config.patch
        0003-build-add-with-nt-threads-and-make-it-default-on-min.patch
        0004-MINGW-translate-gcc-internal-defines-to-python-platf.patch
        0005-MINGW-configure-MACHDEP-and-platform-for-build.patch
        0006-MINGW-preset-configure-defaults.patch
        0007-MINGW-configure-largefile-support-for-windows-builds.patch
        0008-MINGW-add-srcdir-PC-to-CPPFLAGS.patch
        0009-MINGW-init-system-calls.patch
        0010-MINGW-build-in-windows-modules-winreg.patch
        0011-MINGW-determine-if-pwdmodule-should-be-used.patch
        0012-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch
        0013-MINGW-configure-for-shared-build.patch
        0014-MINGW-dynamic-loading-support.patch
        0015-MINGW-ignore-main-program-for-frozen-scripts.patch
        0016-MINGW-setup-_multiprocessing-module.patch
        0017-MINGW-setup-select-module.patch
        0018-MINGW-setup-_ctypes-module-with-system-libffi.patch
        0019-MINGW-defect-winsock2-and-setup-_socket-module.patch
        0020-MINGW-exclude-unix-only-modules.patch
        0021-MINGW-setup-msvcrt-and-_winapi-modules.patch
        0022-sysconfig-MINGW-build-extensions-with-GCC.patch
        0023-MINGW-setup-_ssl-module.patch
        0024-MINGW-generalization-of-posix-build-in-sysconfig.py.patch
        0025-MINGW-support-stdcall-without-underscore.patch
        0026-use-replace-instead-rename-to-avoid-failure-on-windo.patch
        0027-MINGW-customize-site.patch
        0028-add-python-config-sh.patch
        0029-cross-darwin-feature.patch
        0030-mingw-system-libffi.patch
        0031-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch
        0032-mingw-use-posix-getpath.patch
        0033-mingw-add-ModuleFileName-dir-to-PATH.patch
        0034-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch
        0035-msys-cygwin-semi-native-build-sysconfig.patch
        0036-sysconfig-mingw-sysconfig-like-posix.patch
        0037-build-_winapi-earlier-so-we-can-use-it-in-distutils-.patch
        0038-cross-dont-add-multiarch-paths-if-cross-compiling.patch
        0039-mingw-use-backslashes-in-compileall-py.patch
        0040-msys-convert_path-fix-and-root-hack.patch
        0041-allow-static-tcltk.patch
        0042-mingw-pdcurses_ISPAD.patch
        0043-grammar-fixes.patch
        0044-builddir-fixes.patch
        0045-msys-monkeypatch-os-system-via-sh-exe.patch
        0046-msys-replace-slashes-used-in-io-redirection.patch
        0047-remove_path_max.default.patch
        0048-dont-link-with-gettext.patch
        0049-ctypes-python-dll.patch
        0050-gdbm-module-includes.patch
        0051-use-gnu_printf-in-format.patch
        0052-mingw-fix-ssl-dont-use-enum_certificates.patch
        0053-fix-using-dllhandle-and-winver-mingw.patch
        0054-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch
        0055-MINGW-link-with-additional-library.patch
        0056-install-msilib.patch
        0057-fix-signal-module-build.patch
        0058-build-build-winconsoleio-and-_testconsole.patch
        0059-expose-sem_unlink.patch
        0060-cygpty-isatty.patch
        0061-disable-broken-gdbm-module.patch
        0062-build-link-win-resource-files-and-build-pythonw.patch
        0063-3.7-mpdec-mingw.patch
        0064-disable-readline.patch
        0065-fix-isselectable.patch
        0066-use-_wcsnicmp-instead-wcsncasecmp.patch
        0067-_xxsubinterpretersmodule.patch
        0068-sqlite3-module-defines.patch
        0069-configure.ac-fix-inet_pton-check.patch
        0070-set-venv-activate-path-unix.patch
        0071-venv-creation-fixes.patch
        0072-pass-gen-profile-ldflags.patch
        0073-pkg-config-windows-must-link-ext-with-python-lib.patch
        0074-importlib-bootstrap-path-sep.patch
        0075-pathlib-path-sep.patch
        0076-warnings-fixes.patch
        0077-fix-build-testinternalcapi.patch
        0078-extend-MS_WINDOWS-flag.patch
        0079-clang-arm64.patch
        0080-configure.ac-set-MINGW-stack-reserve.patch
        0081-Don-t-use-os.pathsep-to-find-EOF.patch
        0082-Fix-extension-suffix-for-c-extensions-on-mingw.patch
        0083-Change-the-get_platform-method-in-sysconfig.patch
        0084-distutils-compiler-customize-mingw-cygwin-compilers.patch
        0085-distutils-compiler-enable-new-dtags.patch
        0086-distutils-MINGW-build-extensions-with-GCC.patch
        0087-distutils-use-Mingw32CCompiler-as-default-compiler-f.patch
        0088-distutils-find-import-library.patch
        0089-distutils-avoid-circular-dependency-from-time-module.patch
        0090-distutils-generalization-of-posix-build-in-distutils.patch
        0091-distutils-mingw-sysconfig-like-posix.patch
        0092-distutils-get_versions-fixes.patch
        0093-distutils-install-layout-as-posix.patch
        0094-distutils-msys-convert_path-fix-and-root-hack.patch
        0095-distutils-mingw-build-optimized-ext.patch
        0096-distutils-cygwinccompiler-dont-strip-modules-if-pyde.patch
        0097-distutils-get-compilers-from-env-vars.patch
        0098-distutils-add-windmc-to-cygwinccompiler.patch
        0099-distutils-fix-msvc9-import.patch
        0100-distutils-mingw-add-LIBPL-to-library-dirs.patch
        0101-distutils-Change-the-get_platform-method-in-distutil.patch
        0102-build-Fix-ncursesw-include-lookup.patch
        0103-tests-fix-test_bytes.patch
        0104-time-fix-strftime-not-raising-for-invalid-year-value.patch
        0105-ctypes-find_library-c-should-return-None-with-ucrt.patch
        0106-build-Disable-checks-for-dlopen-dlfcn.patch
        0107-Fix-install-location-of-the-import-library.patch
        0108-Set-MSYS2_ARG_CONV_EXCL-for-the-shared-Python-module.patch
        0109-build-Integrate-venvlauncher-build-installation-into.patch
        0110-configure.ac-set-_WIN32_WINNT-version.patch
        0111-configure.ac-don-t-check-for-clock_-functions.patch
        0112-expanduser-normpath-paths-coming-from-env-vars.patch
        0113-Add-support-for-Windows-7-Python-3.9.patch
        0114-Commit-regenerated-importlib.patch
        0115-CI-test-the-build-and-add-some-mingw-specific-tests.patch
        0116-decimal-backport-build-fixes.patch
        0117-smoketests-test-that-_decimal-exists.patch)

# Helper macros to help make tasks easier #
apply_patch_with_msg() {
  for _patch in "$@"
  do
    msg2 "Applying ${_patch}"
    patch -Nbp1 -i "${srcdir}/${_patch}"
  done
}

prepare() {
  cd "${srcdir}/Python-${pkgver}"

 apply_patch_with_msg 0001-sysconfig-make-_sysconfigdata.py-relocatable.patch \
  0002-restore-setup-config.patch \
  0003-build-add-with-nt-threads-and-make-it-default-on-min.patch \
  0004-MINGW-translate-gcc-internal-defines-to-python-platf.patch \
  0005-MINGW-configure-MACHDEP-and-platform-for-build.patch \
  0006-MINGW-preset-configure-defaults.patch \
  0007-MINGW-configure-largefile-support-for-windows-builds.patch \
  0008-MINGW-add-srcdir-PC-to-CPPFLAGS.patch \
  0009-MINGW-init-system-calls.patch \
  0010-MINGW-build-in-windows-modules-winreg.patch \
  0011-MINGW-determine-if-pwdmodule-should-be-used.patch \
  0012-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch \
  0013-MINGW-configure-for-shared-build.patch \
  0014-MINGW-dynamic-loading-support.patch \
  0015-MINGW-ignore-main-program-for-frozen-scripts.patch \
  0016-MINGW-setup-_multiprocessing-module.patch \
  0017-MINGW-setup-select-module.patch \
  0018-MINGW-setup-_ctypes-module-with-system-libffi.patch \
  0019-MINGW-defect-winsock2-and-setup-_socket-module.patch \
  0020-MINGW-exclude-unix-only-modules.patch \
  0021-MINGW-setup-msvcrt-and-_winapi-modules.patch \
  0022-sysconfig-MINGW-build-extensions-with-GCC.patch \
  0023-MINGW-setup-_ssl-module.patch \
  0024-MINGW-generalization-of-posix-build-in-sysconfig.py.patch \
  0025-MINGW-support-stdcall-without-underscore.patch \
  0026-use-replace-instead-rename-to-avoid-failure-on-windo.patch \
  0027-MINGW-customize-site.patch \
  0028-add-python-config-sh.patch \
  0029-cross-darwin-feature.patch \
  0030-mingw-system-libffi.patch \
  0031-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch \
  0032-mingw-use-posix-getpath.patch \
  0033-mingw-add-ModuleFileName-dir-to-PATH.patch \
  0034-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch \
  0035-msys-cygwin-semi-native-build-sysconfig.patch \
  0036-sysconfig-mingw-sysconfig-like-posix.patch \
  0037-build-_winapi-earlier-so-we-can-use-it-in-distutils-.patch \
  0038-cross-dont-add-multiarch-paths-if-cross-compiling.patch \
  0039-mingw-use-backslashes-in-compileall-py.patch \
  0040-msys-convert_path-fix-and-root-hack.patch \
  0041-allow-static-tcltk.patch \
  0042-mingw-pdcurses_ISPAD.patch \
  0043-grammar-fixes.patch \
  0044-builddir-fixes.patch \
  0045-msys-monkeypatch-os-system-via-sh-exe.patch \
  0046-msys-replace-slashes-used-in-io-redirection.patch \
  0047-remove_path_max.default.patch \
  0048-dont-link-with-gettext.patch \
  0049-ctypes-python-dll.patch \
  0050-gdbm-module-includes.patch \
  0051-use-gnu_printf-in-format.patch \
  0052-mingw-fix-ssl-dont-use-enum_certificates.patch \
  0053-fix-using-dllhandle-and-winver-mingw.patch \
  0054-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch \
  0055-MINGW-link-with-additional-library.patch \
  0056-install-msilib.patch \
  0057-fix-signal-module-build.patch \
  0058-build-build-winconsoleio-and-_testconsole.patch \
  0059-expose-sem_unlink.patch \
  0060-cygpty-isatty.patch \
  0061-disable-broken-gdbm-module.patch \
  0062-build-link-win-resource-files-and-build-pythonw.patch \
  0063-3.7-mpdec-mingw.patch \
  0064-disable-readline.patch \
  0065-fix-isselectable.patch \
  0066-use-_wcsnicmp-instead-wcsncasecmp.patch \
  0067-_xxsubinterpretersmodule.patch \
  0068-sqlite3-module-defines.patch \
  0069-configure.ac-fix-inet_pton-check.patch \
  0070-set-venv-activate-path-unix.patch \
  0071-venv-creation-fixes.patch \
  0072-pass-gen-profile-ldflags.patch \
  0073-pkg-config-windows-must-link-ext-with-python-lib.patch \
  0074-importlib-bootstrap-path-sep.patch \
  0075-pathlib-path-sep.patch \
  0076-warnings-fixes.patch \
  0077-fix-build-testinternalcapi.patch \
  0078-extend-MS_WINDOWS-flag.patch \
  0079-clang-arm64.patch \
  0080-configure.ac-set-MINGW-stack-reserve.patch \
  0081-Don-t-use-os.pathsep-to-find-EOF.patch \
  0082-Fix-extension-suffix-for-c-extensions-on-mingw.patch \
  0083-Change-the-get_platform-method-in-sysconfig.patch \
  0084-distutils-compiler-customize-mingw-cygwin-compilers.patch \
  0085-distutils-compiler-enable-new-dtags.patch \
  0086-distutils-MINGW-build-extensions-with-GCC.patch \
  0087-distutils-use-Mingw32CCompiler-as-default-compiler-f.patch \
  0088-distutils-find-import-library.patch \
  0089-distutils-avoid-circular-dependency-from-time-module.patch \
  0090-distutils-generalization-of-posix-build-in-distutils.patch \
  0091-distutils-mingw-sysconfig-like-posix.patch \
  0092-distutils-get_versions-fixes.patch \
  0093-distutils-install-layout-as-posix.patch \
  0094-distutils-msys-convert_path-fix-and-root-hack.patch \
  0095-distutils-mingw-build-optimized-ext.patch \
  0096-distutils-cygwinccompiler-dont-strip-modules-if-pyde.patch \
  0097-distutils-get-compilers-from-env-vars.patch \
  0098-distutils-add-windmc-to-cygwinccompiler.patch \
  0099-distutils-fix-msvc9-import.patch \
  0100-distutils-mingw-add-LIBPL-to-library-dirs.patch \
  0101-distutils-Change-the-get_platform-method-in-distutil.patch \
  0102-build-Fix-ncursesw-include-lookup.patch \
  0103-tests-fix-test_bytes.patch \
  0104-time-fix-strftime-not-raising-for-invalid-year-value.patch \
  0105-ctypes-find_library-c-should-return-None-with-ucrt.patch \
  0106-build-Disable-checks-for-dlopen-dlfcn.patch \
  0107-Fix-install-location-of-the-import-library.patch \
  0108-Set-MSYS2_ARG_CONV_EXCL-for-the-shared-Python-module.patch \
  0109-build-Integrate-venvlauncher-build-installation-into.patch \
  0110-configure.ac-set-_WIN32_WINNT-version.patch \
  0111-configure.ac-don-t-check-for-clock_-functions.patch \
  0112-expanduser-normpath-paths-coming-from-env-vars.patch \
  0113-Add-support-for-Windows-7-Python-3.9.patch \
  0114-Commit-regenerated-importlib.patch \
  0115-CI-test-the-build-and-add-some-mingw-specific-tests.patch \
  0116-decimal-backport-build-fixes.patch \
  0117-smoketests-test-that-_decimal-exists.patch
 
  autoreconf -vfi
}

build() {
  declare -a _extra_config
  if check_option "debug" "n"; then
    _extra_config+=("--enable-optimizations")
    # FIXME: https://github.com/msys2-contrib/cpython-mingw/issues/10
    # _extra_config+=("--with-lto")
  else
    CFLAGS+=" -O0 -ggdb"
    CXXFLAGS+=" -O0 -ggdb"
    _extra_config+=("--with-pydebug")
  fi

  [[ -d "${srcdir}/build-${CARCH}" ]] && rm -rf "${srcdir}/build-${CARCH}"
  mkdir -p "${srcdir}/build-${CARCH}" && cd "${srcdir}/build-${CARCH}"

  ../Python-${pkgver}/configure \
    --prefix=${MINGW_PREFIX} \
    --host=${MINGW_CHOST} \
    --build=${MINGW_CHOST} \
    --enable-shared \
    --with-system-expat \
    --with-system-ffi \
    --with-system-libmpdec \
    --without-ensurepip \
    --without-c-locale-coercion \
    --enable-loadable-sqlite-extensions \
    --with-tzpath=${MINGW_PREFIX}/share/zoneinfo \
    "${_extra_config[@]}"

  make
}

check() {
  cd "${srcdir}/build-${CARCH}"

  # Some basic tests to ensure nothing major or MSYS2 specific features are broken
  ./python.exe "../Python-${pkgver}/mingw_smoketests.py"
  MSYSTEM= ./python.exe "../Python-${pkgver}/mingw_smoketests.py"
}

package() {
  cd "${srcdir}/build-${CARCH}"

  make -j1 install DESTDIR="${pkgdir}"

  # gdb pretty printers for debugging Python itself; to use:
  # python
  # sys.path.append('C:/msys64/mingw64/share/gdb/python3')
  # import python_gdb
  # reload(python_gdb)
  # end
  if [[ "${_primary_python}" == "yes" ]]; then
    [[ -d "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/ ]] || mkdir -p "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/
    cp -f python.exe-gdb.py "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/python_gdb.py
  fi

  # some useful "stuff"
  install -dm755 "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/{i18n,scripts}
  install -m755 "${srcdir}/Python-${pkgver}"/Tools/i18n/{msgfmt,pygettext}.py "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/i18n/
  install -m755 "${srcdir}/Python-${pkgver}"/Tools/scripts/{README,*py} "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/scripts/

  # fixup shebangs
  for fscripts in 2to3 2to3-${_pybasever} idle3 idle${_pybasever} pydoc3 pydoc${_pybasever}; do
    sed -i "s|$(cygpath -w ${MINGW_PREFIX} | sed 's|\\|\\\\|g')/bin/python${_pybasever}.exe|/usr/bin/env python${_pybasever}.exe|g" \
      "${pkgdir}${MINGW_PREFIX}"/bin/${fscripts}
  done

  # default aliases for all scripts/binaries
  if [[ "${_primary_python}" == "yes" ]]; then
    # Default names are aliases for Python now
    cp "${pkgdir}${MINGW_PREFIX}"/bin/python3.exe "${pkgdir}${MINGW_PREFIX}"/bin/python.exe
    cp "${pkgdir}${MINGW_PREFIX}"/bin/python3w.exe "${pkgdir}${MINGW_PREFIX}"/bin/pythonw.exe
    cp "${pkgdir}${MINGW_PREFIX}"/bin/python3-config "${pkgdir}${MINGW_PREFIX}"/bin/python-config
    cp "${pkgdir}${MINGW_PREFIX}"/bin/idle3 "${pkgdir}${MINGW_PREFIX}"/bin/idle
    cp "${pkgdir}${MINGW_PREFIX}"/bin/pydoc3 "${pkgdir}${MINGW_PREFIX}"/bin/pydoc
  fi

  # delete anything that could conflict with the primary Python
  if [[ "${_primary_python}" != "yes" ]]; then
    rm "${pkgdir}${MINGW_PREFIX}"/bin/python3.exe
    rm "${pkgdir}${MINGW_PREFIX}"/bin/python3w.exe
    rm "${pkgdir}${MINGW_PREFIX}"/bin/python3-config
    rm "${pkgdir}${MINGW_PREFIX}"/bin/idle3
    rm "${pkgdir}${MINGW_PREFIX}"/bin/pydoc3
    rm "${pkgdir}${MINGW_PREFIX}"/bin/2to3
    rm "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/python3-embed.pc
    rm "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/python3.pc
    rm "${pkgdir}${MINGW_PREFIX}"/share/man/man1/python3.1
  fi
}

sha256sums=('f8145616e68c00041d1a6399b76387390388f8359581abc24432bb969b5e3c57'
            'df2c54e47405ba4d30918f323f80851b5a0b8f950f60530a03683d34742965b7'
            'aa681853a8ee9351df966557d241daba0656eee551774b036427a5e08dd87b38'
            'f2c312b5363441bffae2ea6c9e9265788754436803ac91be864a2d659b124c1a'
            '4ced1b71a2719d6a5b955ebc4ffff08cd44f66320ce4ff807b1f1836782adfc1'
            '4213cbc8e75212fd27956824ecac1e74e05cb80b4afa1beee8db3f6ae6334443'
            '70c24d6615fa720bd787ac86d56fd661736873ffdbb30b8f4c60bafb0e09e5ad'
            '9a88613a172987d7ef55809ebf1a795967e7bcf654986ff4623c7546430b0b8a'
            'b5266f8b63ca6d358384822bad1ed7a0e856149f0319eadd84d7a9567088a93b'
            '9751a72bc57dd524402999d4dc744daaa7261e87fa337c83b92397e8f3c2fba6'
            'aea7e692aa876fe8c81bff1dc1abed922c6ca43a183fc48d4b51bb7e6cef2299'
            'd4d2f6194175f30f3dfb5c95f4b75df44cd2c451eac43debc11036ccedd3119f'
            'd2a05117adf7b0daa8aa4b5eee1bcb0e1ca6825a75047efb26eed9519d7993d3'
            'cdc74d42a9cba3773cc5948b7c39a8e41761b752c860922fdefcbc289ee9990a'
            'b2cc3901e001e9c0e8906cba06e744b1a04574256059f99bf3c65e3ed27fe30c'
            'a95b268ffb8b2e8f30f3aa7584a5e8ab354228741e3d9ad0b7942bcb57b63850'
            'ad5cc50705b2f139a6f81070693a682fd0a0bb5775cc001103476cd23ddc73ab'
            '4f577f6a739fb2927c4f1f2e219eddd5a245f0c088763f7034e6879c83b5be3f'
            '4ad655612a31cf43a8dd3116c39e22e17415647a2117f70faa344c7935aa30aa'
            'c6d2b52b2d80d69b54e2c0ff7159f7e1d12a27572d6ea26cbd44fb531a8dc0fe'
            '0899e65ed7f83a15fb29af7e161e0879cb51132e81b5ec970c24f5ecc36afae4'
            '785771f8db732a948fa3984806ef99060d308a28e2bdc6d3035e0b036eddd762'
            'f751c8c724a5d2b3f778281558ac9a89199a7257f64ca76f47ccd5bbc843355f'
            'ffe5fe6b4ff072f5e3bee914dfc11351bc3961e7f33eafed69b84478eb85292d'
            'c38f79e4b8c611a10720caf54e005b75fdb9fc9695e0b37ee7c760c33fdd77f4'
            '899de926db7c206e783cf7f3d795839388cef79a77e52209a96cf891c460d1e9'
            'bc04573076bcb59b103fb2f90d2b0551e8c0974085dce98d4af80bbe73a614b3'
            '6882d38451b74058f8875e337fe5c6c7a4a106b6dc19087ea8ec8bb13814d68b'
            'cea1d67f082b5a4cea922c511ab729dff4cfd649db3c7b071ac23584220092c6'
            '3382c9072c1a8920578a1961e0dfd1a5877cc3ae6021845d9df82f4ba29beeec'
            '6132c9895bbc85787fa9f7fba98e6744998fc7ee6d144efc32dccfaffbe5657e'
            '194d0fb0e4b2cacab86c3a33f896d55b9342a3d3830598672de4b767e71d8453'
            'c870804931d7063d7dd7af3893bcd6d21b273f2409abc70ec45394081a42200a'
            'feba9e4ff147372c45c74b616d1b9c5bda4c1708eecd2da4d7b9c5860b3e087a'
            'e1007147d43c293dbc8a6215e0af00c743d59517ac761c263376060fe9deea3c'
            '0167a7fb96e623ed1dcb8ff7f8fee4a06f7b74e96cd87313f939eaa5e789e587'
            'c58aa31a402ca0a28d6c7d8384294e2e052aa7ecafd58a9ea4c2e07397c88c3f'
            '9a0e76acd2d767ffdff5e37582ace6013eee9c07ccddec2fd367111f3d0f1c07'
            'b4345e18d4b8a2e6e146e4d0cb0969a56c246c637d5ff45c2de7566cfa5ecd77'
            '7fac3b2a4e7ebe887ff1637722fd0a4d8736e817df1c9f255fadae23e8aea2ad'
            'c10bf06ce86c932e4bf8e80e5d25c4298b4642da448ffb82a89de6d51c3d4c21'
            '1bc7faa6de9908ac58a4d2d3666a7c9b45fca9128eba28b6408204f29bbcd5ad'
            '1c0c98e6e2ce6150aee1ca8b85e1d8189a7b2fcd02a430cc08785a05ec231d0c'
            '90c06d4db535a4c9ec6cdb82e6be011daa0be48a3faed33ee653281102d2c94d'
            '3c15a49603b039f3fe2369801325f7bfc928c48a7d801d62e18304bd50263f5c'
            '3f8bd30931f29fb64b6d3e24018628885690a05548e2fe2f553dfa600a9b38ff'
            '3ba7d08bcebb55058b2b5d2a134f8ba790729050aeb3f37787fc25708aebb812'
            '8072de1f6ff54072822b5daa12f7f03ec9face678e2a791c39b4e90bd427ad32'
            '15d2837596e0fe66c049edcce708edcd335dd16d753829813bbe114a6f6d3b64'
            'cd8337276ec3758eefbc6be8d6ad5e9420172611f36cff20178791c6377a6454'
            '7fc9581d1e21eb521d7e17d2eb6c42c29cf7da090992dfa982d3ec3fdec33d35'
            'eeea5d40d0d9652522af9745cd520c133d7831c6ab9921a37e98aa09e5f886b1'
            'a716d9e602955b613ccdd3112dade5295cf7788ea256b3eb473b180db5495631'
            'a570b8dd51a7d0cd677d97ffa8a953853ece49e3b3646cefaa79a3a2c5d6715a'
            '204902ebe3057e1f8456b2cefb1f45de98089ff06a0e29896977f59f0d427f88'
            '74de5a88dbc897387ae49ae520bf4ae6abbdfde609328dc47e5e6bf92fdca58f'
            '286e26df606946a02abc744afc47652f515b5bf49d6eaf41fa7ebc527091d31a'
            'd124c3d7c5c64e5d58ea65251acf843c7a9840ad07fba7e66320b6770b1bb627'
            '60077b7b57bc9fb33a46c50f7fc4a4d8dd7bc595d5577754abc9450acd9b699f'
            'f16d9a0463f0153be2ce1fb97de669a939de2abb273336cfaaf5197ee24298ba'
            '15fce27d400acaf4e8b6906f52b45630820b31705cdd4275bf318d0f0ea7ca76'
            'bc576e90799d911e04d5d0a849cf69e8f7b16203a6d3fa242ea877c7b248dc68'
            '33227eaa8be6128d493e20264288c6cdef25c05658802abbc723972e9c20ae7f'
            '2febd7ff601d1e898cdc469e21acb73af75c67404d9bb2fd4a85f0daf1ee8b19'
            'f441313d7b5a94c7664b84460e7c54a28eb3eebdf746ac91a0dfc9e5e28c904c'
            '4389341d39da0a905e2c068a3ea4c690c73bbd7f776f5c90120c5c96d3584e8c'
            '19fd3ac3134443641b750b884286aa3e9bca53ce7b0c510eb03990bc7c01827b'
            '09eb6edad897dfecc67c0300e2a3c965456e8544089eeac184d51d581bdd1bd5'
            'ab5be61da63d9e626ab24cb94abaef9dd272b80d3ad1721cb84c0c9673d4eeb1'
            'd24a731946d1eeb2b10e3acef2458078259f17271a88602e305bca2b1ec9b1f1'
            '294847acdd6170224b8c6e4264902d7698c8dc7dfdf9909fbcde73b77e562b56'
            '5b17efce0754ba9f4c2e1054b87cfc52bdcd3d97a2069a062341a6b20922973d'
            '81a68ca41ce94fca4db88685700dff6ca991b28197a6a8d25a41b8c8cba3d0b2'
            '412495b7b757c8ae4a91a9a93f40740491f1908544e43cacc79b2d586937f21f'
            '79d6df7ca3255fc83b0d757da32bb4e738d2738e43077b3d9d2fbf1d331e9e19'
            'b174c0b8818646f2631f22bb2cdc6f40d0f9e6f11388fad67875b2701ea949b7'
            '0fa468b37c54c3faf857928d94310380a8c4775be7b5b8f641160951755936e3'
            'b23d1f68e7c4c8036294abc0ad0bae681ed5e03543b437b079899b69bd53bbda'
            '9bd82e248f900023406cbb95294feb98d436749f6261ebc92addc38011f70644'
            '8b3a0b9d2972532da541d2cb2e6b91fa922db9000e8ede8cc4c5bdce8be689e7'
            '2c2a3e69826f543ee9144f3218dd0a9bd061c817182232f550bb4e44d9c525c7'
            '66478434640138aa1533b844377e12b047385d8e375e5c97f88185ddaa72ef31'
            '8911ffd4760c1c95ad99f4faa6fca3c908908fbbed4fb3dab99a8f446192e5e2'
            'f447ebdc2f4719794f12fcde2de794a0e0470a38c89db8aaab5100a539fccde0'
            '32e3020ac50fc25000e92df557a9890c5ee46ab3cfd402b4e53fe7cbc5076f06'
            'a62971909bc503db6842d434138115b917fdd86194f8c3e1b12daf2281756dad'
            'a83c2faa794149d6f2f7a0645425b893af48e33aaf3f893f064e65e20d72f360'
            '842d7ccdb0377f6f90254087db112c3110d19b2aacb28cfaa1e8499d5198bafe'
            '73b5f1df4bc5547ac35da2d6878a7d575c945bbb0d9d8de99249ec95fb4e968a'
            '53d10f411edf4223c35f5643356a08e10a43429cb4120b0f5c50766d39593f71'
            '509d93d8e4043e5060ef5ea47c5bdaeb735ad592d162699b3c7a044fac8d007a'
            'b229bc121c4e9e582d37e34498e16d8f8337b677f6e8e3c947739800edba4282'
            '6da7fc39ed6c8618e9bb83694923682840c63cd95a47a7e329e2e6457c640d8c'
            'c4e9f0ac0acc62ebd5225a93493899237ec2ab6bed933e94c5c85befc8484403'
            'f764ba9cc51ae4792a3fcf41ba6009e4d475baa884435d012a882bd1c7500b99'
            '0a08f9501f104adb53fa4607b7359dee03d94521f6a2c4773067ae59522c9044'
            '12a16d62b5cf3f300160f9bce070191c6158bcf69d66065bf4157d6785f9a233'
            '113e7398c9d650d4933a61348ab6e9bcc6150a8dee68daaf8d461efcc180a82c'
            '56f28ac0c4ee97de1759b1fe71766fa33ed42622c4a293450819db1d3cb23ed6'
            '6feb4cc5fa9e7a5ccb901c5395fb1901e18998932b85eb4d586f94a651deee82'
            'ed7753f26f6137201a51c83b6248072336ca7ecc0bc84f6af699f86fc43d9888'
            '4e578eb794d5c596d5c9ef506a4f6da5a34502ce41880d09e2858a9b5f22c22a'
            '61230841fadc6b4034a14fe98660bb50e3bf2655f0ab0a7136c7a6fa69966edd'
            'a6116651c9d4cded146398e95ab2e98874fc9ca192b62f5b4f74cc5d57af15ed'
            'd7fa6e7fd9fe3d6526a8c0bfce969e8c7cce8fe585465f0786b096abe303f791'
            'c1f0083ea07591961042f476cacd1a7d7ae0abb0f3730b94c3e67cdca0ade27b'
            'ce11acd1a6089ad94817347fe9a35e6a288e5b5afc8f0ddff9bffd617b8cb82b'
            'f88485b3f587d7793ca3d6a4a0e2a768570a04f9e81d67c58aae5d5cc5b16aa6'
            '55033e8ec9ba08e22a509c10e11f30271f032d9181783f99701c4c7e77bb5eb6'
            'fe0e4a3116a5c7a7efb84da66b0317b3004a6d3d9bb0eff93240cf04fbf617e6'
            '1230f98066a2d463b3e050c9d3e8364f9002eba576af10faaff81cfd182bd0f3'
            '7acb2a9d98dee9592a0ec4fa25877288b268cfdb4f2f1cc8e24bc34599d79f77'
            'c4e3e7903b17056a97af98a7b1e9737b323e51097e967789d3a2796914a8d6af'
            'a0c51295efba6111c9916d26decf810119f56695bdb2776179367ce291a875d4'
            '14251dcc7b776b2640941f675be4449addb598537b522c4e574f9a4bc37c65c1'
            'e4d481bc25f6386c6da99e2cbe058b21bc0c68bf8f01c73d3adf60e98f5a506d'
            '0e0766e3aece0a9cfa8e4e0e6592d6f5082ffc686b6b195a3fdb942b5b24ec29'
            '169b29cb4eb9177938d66b99234a83d5efcc5b0b759d4e1b9ef2acb357e11a15')
